<?php //e($javascript->link('admin_index'));?>
<div id="comment-admin">
	<table id="the-table">
		<caption>Comment on <?php e($sitename);?></caption>
		<colgroup>
			<col id="id" />
			<col id="title" />
			<col id="byline" />
			<col id="author" />
			<col id="published />"
			<col id="actions" />
		</colgroup>
		<thead>
			<tr>
				<th scope="col"><?php echo $paginator->sort('id');?></th>
				<th scope="col"><?php echo $paginator->sort('post_id');?></th>
				<th scope="col"><?php echo $paginator->sort('user_id');?></th>
				<th scope="col"><?php echo $paginator->sort('title');?></th>
				<th scope="col"><?php echo $paginator->sort('published');?></th>
				<th scope="col">Actions</th>
			</tr>
		</thead>
		<tbody>
			<?php $row = 0; ?>
			<?php foreach ($comments as $comment) : ?>
			<tr class="<?php ($row % 2 ? e('even') : e('odd'));?>">
				<td><?php e($comment['Comment']['id']);?></td>
				<td><?php echo $html->link($comment['Post']['title'], array('controller'=> 'posts', 'action'=>'view', $comment['Post']['url'])); ?></td>
				<td><?php echo $html->link($comment['User']['username'], array('controller'=> 'users', 'action'=>'view', $comment['User']['id'])); ?></td>
				<td><?php echo $comment['Comment']['title']; ?></td>
				<td><?php ($comment['Comment']['published'] == 0 ? e('No') : e('Yes'));?></td>
				<td>
					<ul>
						<li><?php e($html->link('Edit', '/admin/comments/edit/' . $comment['Comment']['id'], array('class'=>'button')));?></li>
						<li><?php e($html->link('Delete', '/admin/comments/delete/' . $comment['Comment']['id'], array('class'=>'button'),'Are you sure you wish to delete comment "' . $comment['Comment']['id'] . '"'));?></li>
					</ul>
				</td>
			</tr>
			<?php $row++; ?>
			<?php endforeach; ?>
		</tbody>
	</table>
</div>

<div id="paginate">
	<span class="previous">
		<?php e($paginator->prev('<< Previous', null, null, array('class' => 'disabled'))); ?>
	</span>
	<span class="next">
		<?php e($paginator->next('Next >>', null, null, array('class' => 'disabled'))); ?>
	</span>
	<br style="clear" />
</div>